<template>
  <div class="notice">
    <div class="notice-icon blinking" />
    <div class="notice-txt">【公告】：</div>
    <el-carousel
      height="40px"
      direction="vertical"
      autoplay
      indicator-position="none"
      class="loop-tips"
    >
      <el-carousel-item v-for="item in 3" :key="item">
        <p :class="['tip', 'type-' + type]" title="sxxx">{{ item }} -9 23456789</p>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  name: 'Notice',
  components: {},
  mixins: [],
  props: {
    type: {
      type: Number,
      default: 1
    }
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {
  },
  mounted() {
  },
  methods: {}
}
</script>

<style scoped lang="scss">
@import "../../element-variables.scss";
.notice {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;

  .notice-icon {
    width: 16px;
    height: 16px;
    background: url("../../assets/images/notice.png") no-repeat center;
    background-size: cover;
    margin: 0 10px 0 20px;
  }
  .notice-txt {
    color: #f00;
  }
  .loop-tips {
    flex: 1;
    .tip {
      line-height: 40px;
      cursor: pointer;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      color: #808080;
      &:hover {
        color: $--color-primary;
      }
      &.type-2 {
        color: #fff;
        opacity: .7;
        &:hover {
          text-decoration: underline;
          opacity: 1;
        }
      }
    }
  }
}
</style>
